package de.voegel.model.entity;

import java.sql.Timestamp;

public class ChecklistEntity {
	private final Integer id;
	private final Timestamp startzeitpunkt;
	private final String land;
	private final String lat_name;

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((land == null) ? 0 : land.hashCode());
		result = prime * result
				+ ((lat_name == null) ? 0 : lat_name.hashCode());
		result = prime * result
				+ ((startzeitpunkt == null) ? 0 : startzeitpunkt.hashCode());
		return result;
	}

	@Override
	public String toString() {
		return "[id=" + id + ", startzeitpunkt=" + startzeitpunkt + ", land="
				+ land + ", lat_name=" + lat_name + "]";
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ChecklistEntity other = (ChecklistEntity) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (land == null) {
			if (other.land != null)
				return false;
		} else if (!land.equals(other.land))
			return false;
		if (lat_name == null) {
			if (other.lat_name != null)
				return false;
		} else if (!lat_name.equals(other.lat_name))
			return false;
		if (startzeitpunkt == null) {
			if (other.startzeitpunkt != null)
				return false;
		} else if (!startzeitpunkt.equals(other.startzeitpunkt))
			return false;
		return true;
	}

	public Integer getId() {
		return id;
	}

	public Timestamp getStartzeitpunkt() {
		return startzeitpunkt;
	}

	public String getLand() {
		return land;
	}

	public String getLat_name() {
		return lat_name;
	}

	public ChecklistEntity(Integer id, Timestamp startzeitpunkt, String land,
			String lat_name) {
		super();
		this.id = id;
		this.startzeitpunkt = startzeitpunkt;
		this.land = land;
		this.lat_name = lat_name;
	}
}
